import java.util.Scanner;

public class Test03 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int nums = scan.nextInt();
        int count = 0;
        for (int i = 0; i < nums; i++) {
            long m = scan.nextLong();
            while (m % 2 == 0 && m > 1) {
                m = m / 2;
            }
            if(m == 1) { // 如果 m 最终变成了1
                count++; // 计数器 ans 加1
            }
        }
        System.out.println(count);
        scan.close();
    }
}
